﻿	public {{ property_type }} {{ property_name }}
	{
        get => _{{ property_name | first_lower }};
        set
        {
            if (_{{ property_name | first_lower }} == value)
            {
                return;
            }

            var prev{{ property_name }} = _{{ property_name | first_lower }};
            _{{ property_name | first_lower }} = value;

            if (IsLoading)
            {
                return;
            }

            if (prev{{ property_name }}?.{{ association_property_name }} == this)
            {
                prev{{ property_name }}.{{ association_property_name }} = null;
            }

            if (_{{ property_name | first_lower }} != null)
            {
                _{{ property_name | first_lower }}.{{ association_property_name }} = this;
            }

            OnChanged(nameof({{ property_name }}));
        }
	}